<script>
	import {
		mapMutations
	} from 'vuex';
	export default {
		methods: {
			...mapMutations(['login'])
		},
		onLaunch: function() {
			let token = uni.getStorageSync('token') || '';
			if(token){
				//更新登陆状态
				uni.getStorage({
					key: 'token',
					success: (res) => {
						this.login(res.data);
					}
				});
			}
				
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import "./static/icon/iconfont.css";
</style>
